package com.neusoft.demo3;

public class TestStudent {
    public static void main(String[] args) {
        //1. 创建Student类的对象
        Student student = new Student();
        //访问Student对象中的属性
        student.setSid(100);
        student.setSname("fender");
        student.setAge(20);
        student.setSchool("neu");
        //访问Student对象中的方法
        student.eat();
        student.study();
        System.out.println(student.getSid() + "---" + student.getSname() + "---" + student.getAge() + "---" + student.getSchool());
    }
//    public static void main(String[] args) {
//        //1. 创建Student类的对象
//        Student student = new Student();
//        //访问Student对象中的属性
//        student.sid = 100;
//        student.sname = "fender";
//        student.age = 20;
//        student.school = "neu";
//        //访问Student对象中的方法
//        student.eat();
//        student.study();
//        System.out.println(student.sid + "---" + student.sname + "---" + student.age + "---" + student.school);
//
//        Student student1 = new Student();
//        student1.sid = 101;
//        student1.sname = "gibson";
//        student1.age = 25;
//        student1.school = "foreknow";
//
//        student1.eat();
//        student1.study();
//        System.out.println(student1.sid + "---" + student1.sname + "---" + student1.age + "---" + student1.school);
//    }
}
